package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 蒋柏平
 * @since 20240927
 */
@Data
@Alias("CompanyDepartmentEmployee")
@TableName(value = "company_department_employee")
@ApiModel(value = "部门用户关联表", description = "部门用户关联表")
public class CompanyDepartmentEmployee extends BaseModel<CompanyDepartmentEmployee> implements Serializable {

    @ApiModelProperty(value = "主键")
    @TableId(value = "company_department_employee_id", type = IdType.ASSIGN_UUID)
    private String companyDepartmentEmployeeId;

    @ApiModelProperty(value = "创建时间 - 不需程序员处理")
    @TableField(value = "create_date_time", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "版本号")
    @TableField(value = "version")
    @Version
    private Integer version;

    @ApiModelProperty(value = "更新时间 - 不需程序员处理")
    @TableField(value = "update_date_time", fill = FieldFill.INSERT_UPDATE)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "创建用户名称")
    @TableField(value = "create_user_name", fill = FieldFill.INSERT)
    private String createUserName;

    @ApiModelProperty(value = "更新用户名")
    @TableField(value = "update_user_name", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;

    @ApiModelProperty(value = "公司ID(关联company)")
    @TableField(value = "company_id")
    private String companyId;

    @ApiModelProperty(value = "用户id")
    @TableField(value = "user_id")
    private String userId;

    @ApiModelProperty(value = "公司部门ID")
    @TableField(value = "company_department_id")
    private String companyDepartmentId;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "is_del")
    @TableLogic
    private Boolean isDel;

    @ApiModelProperty(value = "是否为部门负责人")
    @TableField(value = "is_principal")
    private Boolean isPrincipal;

    @ApiModelProperty(value = "是否为兼职")
    @TableField(value = "is_part_time_job")
    private Boolean isPartTimeJob;

    @ApiModelProperty(value = "用户职称")
    @TableField(value = "job_name")
    private String jobName;

    @ApiModelProperty(value = "公司员工ID")
    @TableField(value = "company_employee_id")
    private String companyEmployeeId;


}
